package com.dtx.domain;

import java.io.Serializable;

//高级试题管理
public class HExam implements Serializable {
    private Integer id;
    private String name;
    private String xA;
    private String xB;
    private String xC;
    private String xD;
    private String correct;
    private int fenlei; //1为设计模式，2为软件测试，3为软件质量属性
    private String categoryStatus;
    private int zhenti;
    private String paperType;
    private Integer flag; //1为试题存在，0为试题删除

    public HExam() {
    }

    public HExam(Integer id, String name, String xA, String xB, String xC, String xD, String correct, int fenlei, String categoryStatus, int zhenti, String paperType, Integer flag) {
        this.id = id;
        this.name = name;
        this.xA = xA;
        this.xB = xB;
        this.xC = xC;
        this.xD = xD;
        this.correct = correct;
        this.fenlei = fenlei;
        this.categoryStatus = categoryStatus;
        this.zhenti = zhenti;
        this.paperType = paperType;
        this.flag = flag;
    }

    public String getPaperType() {
        if(zhenti==1){
            paperType="A卷";
        }else if(zhenti==2){
            paperType="B卷";
        }else if(zhenti==3){
            paperType="C卷";
        }
        return paperType;
    }

    public void setPaperType(String paperType) {
        this.paperType = paperType;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getxA() {
        return xA;
    }

    public void setxA(String xA) {
        this.xA = xA;
    }

    public String getxB() {
        return xB;
    }

    public void setxB(String xB) {
        this.xB = xB;
    }

    public String getxC() {
        return xC;
    }

    public void setxC(String xC) {
        this.xC = xC;
    }

    public String getxD() {
        return xD;
    }

    public void setxD(String xD) {
        this.xD = xD;
    }

    public String getCorrect() {
        return correct;
    }

    public void setCorrect(String correct) {
        this.correct = correct;
    }

    public int getFenlei() {
        return fenlei;
    }

    public void setFenlei(int fenlei) {
        this.fenlei = fenlei;
    }

    public String getCategoryStatus() {
        if(fenlei==1){
            categoryStatus="设计模式";
        }else if(fenlei==2){
            categoryStatus="软件测试";
        }else if(fenlei==3){
            categoryStatus="软件质量属性";
        }
        return categoryStatus;
    }

    public void setCategoryStatus(String categoryStatus) {
        this.categoryStatus = categoryStatus;
    }

    public int getZhenti() {
        return zhenti;
    }

    public void setZhenti(int zhenti) {
        this.zhenti = zhenti;
    }

    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    @Override
    public String toString() {
        return "HExam{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", xA='" + xA + '\'' +
                ", xB='" + xB + '\'' +
                ", xC='" + xC + '\'' +
                ", xD='" + xD + '\'' +
                ", correct='" + correct + '\'' +
                ", fenlei=" + fenlei +
                ", categoryStatus='" + categoryStatus + '\'' +
                ", zhenti=" + zhenti +
                ", paperType='" + paperType + '\'' +
                ", flag=" + flag +
                '}';
    }

}
